import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter);

const Home = () => import('views/Home');
const CommConfig = () => import('components/report/CommConfig');
const ReportPane = () => import('components/report/ReportPane');



const routes = [
  {
    path: "/",          // 访问根路径时重定向到登录页面
    redirect: "/home"
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/home/commConfig',
        component: CommConfig
      },
      {
        path: '/home/reportPane',
        component: ReportPane
      }
    ]
  },
];


const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
});


export default router
